﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ProjetoJVA.Gui
{
    public partial class LoginTela : Form
    {
        PrincipalTela pt;
        MatriculaTela mt;
        public LoginTela()
        {
            InitializeComponent();
        }


        private void botaoOk_Click(object sender, EventArgs e)
        {
            if (campoUsuario.Text.Equals("Secretaria"))
            {
                pt = new PrincipalTela();
                pt.Show();
                this.Hide();
            }
            else if (campoUsuario.Text.Equals("Matricula"))
            {
                mt = new MatriculaTela();
                mt.Show();
                this.Hide();
            }else
            {
                MessageBox.Show("Login Inválido!");
            }

        }

        private void botaoCancelar_Click(object sender, EventArgs e)
        {
            Environment.Exit(0);
        }

        private void LoginTela_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
        }
    }
}
